package com.ruoyi.system.service.patient.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.patient.DoctorInfo;
import com.ruoyi.system.mapper.patient.DoctorInfoMapper;
import com.ruoyi.system.service.patient.IDoctorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * doctorInfoService业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class DoctorInfoServiceImpl implements IDoctorInfoService
{
    @Autowired
    private DoctorInfoMapper doctorInfoMapper;

    /**
     * 查询doctorInfo
     * 
     * @param id doctorInfo主键
     * @return doctorInfo
     */
    @Override
    public DoctorInfo selectDoctorInfoById(Long id)
    {
        return doctorInfoMapper.selectDoctorInfoById(id);
    }

    /**
     * 查询doctorInfo列表
     * 
     * @param doctorInfo doctorInfo
     * @return doctorInfo
     */
    @Override
    public List<DoctorInfo> selectDoctorInfoList(DoctorInfo doctorInfo)
    {
        return doctorInfoMapper.selectDoctorInfoList(doctorInfo);
    }

    /**
     * 新增doctorInfo
     * 
     * @param doctorInfo doctorInfo
     * @return 结果
     */
    @Override
    public int insertDoctorInfo(DoctorInfo doctorInfo)
    {
        doctorInfo.setCreateTime(DateUtils.getNowDate());
        return doctorInfoMapper.insertDoctorInfo(doctorInfo);
    }

    /**
     * 修改doctorInfo
     * 
     * @param doctorInfo doctorInfo
     * @return 结果
     */
    @Override
    public int updateDoctorInfo(DoctorInfo doctorInfo)
    {
        doctorInfo.setUpdateTime(DateUtils.getNowDate());
        return doctorInfoMapper.updateDoctorInfo(doctorInfo);
    }

    /**
     * 批量删除doctorInfo
     * 
     * @param ids 需要删除的doctorInfo主键
     * @return 结果
     */
    @Override
    public int deleteDoctorInfoByIds(Long[] ids)
    {
        return doctorInfoMapper.deleteDoctorInfoByIds(ids);
    }

    /**
     * 删除doctorInfo信息
     * 
     * @param id doctorInfo主键
     * @return 结果
     */
    @Override
    public int deleteDoctorInfoById(Long id)
    {
        return doctorInfoMapper.deleteDoctorInfoById(id);
    }
}
